from typing import *

class Solution:
    def fairCandySwap(self, aliceSizes: List[int], bobSizes: List[int]) -> List[int]:
        a,b =sum(aliceSizes),sum(bobSizes)
        avg = (a + b) // 2
        d = avg - a
        s = set(bobSizes)
        for i in aliceSizes:
            if i + d in s:
                return [i,i + d]